package com.pica.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pica.system.mapper.CommentsMapper;
import com.pica.system.domain.Comments;
import com.pica.system.service.ICommentsService;
import com.pica.common.core.text.Convert;

/**
 * commentsService业务层处理
 * 
 * @author 徐鑫杰
 * @date 2022-12-14
 */
@Service
public class CommentsServiceImpl implements ICommentsService 
{
    @Autowired
    private CommentsMapper commentsMapper;

    /**
     * 查询comments
     * 
     * @param comId comments主键
     * @return comments
     */
    @Override
    public Comments selectCommentsByComId(Long comId)
    {
        return commentsMapper.selectCommentsByComId(comId);
    }

    /**
     * 查询comments列表
     * 
     * @param comments comments
     * @return comments
     */
    @Override
    public List<Comments> selectCommentsList(Comments comments)
    {
        return commentsMapper.selectCommentsList(comments);
    }

    /**
     * 新增comments
     * 
     * @param comments comments
     * @return 结果
     */
    @Override
    public int insertComments(Comments comments)
    {
        return commentsMapper.insertComments(comments);
    }

    /**
     * 修改comments
     * 
     * @param comments comments
     * @return 结果
     */
    @Override
    public int updateComments(Comments comments)
    {
        return commentsMapper.updateComments(comments);
    }

    /**
     * 批量删除comments
     * 
     * @param comIds 需要删除的comments主键
     * @return 结果
     */
    @Override
    public int deleteCommentsByComIds(String comIds)
    {
        return commentsMapper.deleteCommentsByComIds(Convert.toStrArray(comIds));
    }

    /**
     * 删除comments信息
     * 
     * @param comId comments主键
     * @return 结果
     */
    @Override
    public int deleteCommentsByComId(Long comId)
    {
        return commentsMapper.deleteCommentsByComId(comId);
    }
}
